home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / assert.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-21  |  827 b   |  43 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     Assert.h
  4.     Diagnostics
  5.     
  6.     Copyright © Apple Computer,Inc.  1987-1990, 1994.
  7.     All Rights Reserved.
  8.  
  9. ************************************************************/
  10.  
  11. #ifdef NDEBUG
  12.     #undef assert
  13.     #define assert(ignore) ((void) 0)
  14. #else
  15.  
  16.     #ifdef __CFM68K__
  17.         #ifdef UsingSharedLibs
  18.             #pragma lib_export on
  19.             #define    _EXP_ON_
  20.         #endif
  21.     #endif
  22.     #ifdef __cplusplus
  23.         extern "C" {
  24.     #endif
  25.     void __assertprint(const char* file, int line, const char* expr);
  26.     #ifdef __cplusplus
  27.         }
  28.     #endif
  29.     #ifdef __CFM68K__
  30.         #if defined(UsingSharedLibs) && ! defined(_EXP_ON_)
  31.             #pragma lib_export on
  32.         #endif
  33.     #endif
  34.     
  35.     #define assert(expression) \
  36.         ( (expression) ? (void) 0 : (__assertprint(__FILE__, __LINE__, #expression)) )
  37.  
  38.     #ifdef _EXP_ON_
  39.         #undef _EXP_ON_
  40.     #endif
  41.             
  42. #endif
  43.